<script lang="ts" setup>
/**
 * 大屏主页面
 * 采用缩放的形式进行适配，搭配rem的话很方便实用
 *  */
import {
  defineComponent,
  ref,
  getCurrentInstance,
  reactive,
  toRef,
  computed,
  onMounted,
  onActivated,
  watch
} from 'vue'
import AutoScalContainer from '@/components/autoScalContainer.vue'
const dataContainer = reactive({
  loading: false,
  fit: 'contain'
})
</script>

<template>
  <div class="big-screen-view">
    <AutoScalContainer :height="1080" :width="1920" :fit="dataContainer.fit">
      <div
        class="big-screen-view-container"
      >
        <div class="head">
          数据可视化大屏展示
        </div>
        <div class="content">
          <!-- <div class="top">
            1
          </div> -->
          <div class="content">
            <div class="left">
              left
            </div>
            <div class="right">
              right
            </div>
          </div>
        </div>
        <div class="centre-box">
          map
        </div>
      </div>
    </AutoScalContainer>
  </div>
</template>

<style lang="scss" scoped>
.big-screen-view {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #eff6ff;
  .big-screen-view-container {
    width: 1920px;
    height: 1080px;
    background-color: #eff6ff;
    display: flex;
    flex-direction: column;
    background-image: var(--bg-img-1);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    position: relative;

    > .head {
      height: 91px;
      position: relative;
      z-index: 2;
      text-align: center;
      line-height: 90px;
      font-size: 30px;
    }

    > .content {
      display: flex;
      flex-direction: column;
      flex: 1 1 0;
      width: 100%;
      height: 0;
      position: relative;
      z-index: 2;
      pointer-events: none;
      > .content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        flex: 1 1 0;
        width: 100%;
        height: 0;
        padding: 0 15px 15px 15px;
        box-sizing: border-box;

        > .left,
        > .right {
          display: flex;
          flex-direction: column;
          background: #fff;
          > .box {
            width: 100%;
            flex: 1 1 0;
            height: 0;
            background-image: var(--bg-img-2);
            background-repeat: no-repeat;
            background-size: 100% 100%;
            background-position: center;
            margin: 0 0 15px 0;
            pointer-events: initial;

            &:last-child {
              margin: 0;
            }
          }
        }

        > .left {
          height: 100%;
          width: 550px;
        }

        > .right {
          height: 100%;
          width: 550px;
        }
      }
    }

    > .centre-box {
      position: absolute;
      top: 90px;
      left: 550px;
      right: 550px;
      width: calc(100% - 1140px);
      height: calc(100% - 150px);
      padding: 20px;
      z-index: 1;
      display: flex;
      flex-direction: column;
      background-color: #f2f2f2;

      > .v-height {
        width: 100%;
        height: 270px;
      }

      > .container {
        flex: 1 1 0;
        height: 0;
        width: 100%;
      }
    }
  }
}
</style>
